import store from '@/plugins/store'

export const requestBeforeFun = (config) => {
	// 主要是这里 加入用户的openid
	if(!!store.getters.token && !!store.getters.userId){
		config.header['Y-Token'] = store.getters.token
		config.header['Y-User'] = store.getters.userId
		// config.header['Y-Token'] = "CF088FA40A898EE317090CEDBAB2459C"
		// config.header['Y-User'] = "3"
	}
	if(config.method == "POST"){
		config.header['Content-Type'] = 'application/x-www-form-urlencoded'
	}
	return config
}
export const responseBeforeFun = (res) => {
	return res
} 
